import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_app/main02.dart';

/**
 * 引入本地图片
 */
main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Flutter Demo'),
        ),
        body: HomeContent(),
      ),
    );
  }
}

class HomeContent extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ListView(
      padding: EdgeInsets.all(20),
      children: [
        Image.network(
            "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2FnJmjx6MxgPEsfXSy6vLzqoanX5pAUVVgVVU2Avr07ABws1546655747784.jpeg&thumbnail=650x2147483647&quality=80&type=jpg"),
        Container(
          child: Text(
            "我是一个标题",
            textAlign: TextAlign.center,
            style: TextStyle(
              fontSize: 28,
            ),
          ),
          height: 60,
          padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
        ),
        Image.network(
            "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2FnJmjx6MxgPEsfXSy6vLzqoanX5pAUVVgVVU2Avr07ABws1546655747784.jpeg&thumbnail=650x2147483647&quality=80&type=jpg"),
        Image.network(
            "https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2FnJmjx6MxgPEsfXSy6vLzqoanX5pAUVVgVVU2Avr07ABws1546655747784.jpeg&thumbnail=650x2147483647&quality=80&type=jpg"),
      ],
    );
  }
}
